/**
 * @file Base/Config.hpp
 * @brief 设备配置基础类
 */

#ifndef CONFIG_VIRTUAL_H
#define CONFIG_VIRTUAL_H

#include "../Base/Config.hpp"
#include "Camera.hpp"
#include <any>

class VirtualConfig : public BaseConfig {
  VirtualCamera *camera;

public:
  struct ConnectItem {
    std::function<std::any(VirtualConfig *ptr)> funcGet;
    std::function<void(VirtualConfig *ptr, const std::any &data)> funcSet;
  };

  VirtualConfig(VirtualCamera *camera_);
  virtual ~VirtualConfig(){};
  virtual std::vector<item> ItemList() override final;
  virtual bool Get(int id, std::string &value) override final;
  virtual bool Get(int id, long &value) override final;
  virtual bool Get(int id, double &value) override final;
  virtual bool Get(int id, bool &value) override final;
  virtual bool Set(int id, const std::string &value) override final;
  virtual bool Set(int id, const long &value) override final;
  virtual bool Set(int id, const double &value) override final;
  virtual bool Set(int id, const bool &value) override final;
};

#endif
